package com.zetor.ms.repository.entity.mybatisplus;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zetor.ms.core.entity.BaseEntity;

import java.io.Serializable;

/**
 * mybatis demo
 * @author zlc
 * @date 6.16
 */
@TableName("MYBATIS_DEMO_USER")
public class DemoUserEntity extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

//    @TableId(type = IdType.AUTO)
    private Long id;
    private String name;
    private Integer age;
    // for test, no db property
    @TableField(exist = false)
    private Integer sex;

    private String email;
    @TableField(exist = false)
    private String ignoreColumn = "ignoreColumn";

    @TableField(exist = false)
    private Integer count;

    public DemoUserEntity() {
    }

    public DemoUserEntity(Long id, String name, Integer age, Integer sex) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    public Long getId() {
        return id;
    }

    public DemoUserEntity setId(Long id) {
        this.id = id;
        return this;
    }

    public String getName() {
        return name;
    }

    public DemoUserEntity setName(String name) {
        this.name = name;
        return this;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public DemoUserEntity setAge(Integer age) {
        this.age = age;
        return this;
    }

    public String getEmail() {
        return email;
    }

    public DemoUserEntity setEmail(String email) {
        this.email = email;
        return this;
    }

    public String getIgnoreColumn() {
        return ignoreColumn;
    }

    public DemoUserEntity setIgnoreColumn(String ignoreColumn) {
        this.ignoreColumn = ignoreColumn;
        return this;
    }

    public Integer getCount() {
        return count;
    }

    public DemoUserEntity setCount(Integer count) {
        this.count = count;
        return this;
    }
}
